package com.mall.user.domain.model;

public record ShipCompany(String name) {
    public ShipCompany {
        //店铺设置的快递公司Id长度必须等于500个字符
        if (name.length() != 500) {
            throw new IllegalArgumentException("店铺设置的快递公司Id长度必须等于500个字符");
        }
    }

    public static ShipCompany of(String name) {
        return new ShipCompany(name);
    }
}
